import warnings

warnings.filterwarnings('ignore')
from ultralytics import YOLO

yolov8n_leds_p2 = r"E:\experiments\runs\cloud_runs\Small_scaled_DroneBird9K\SGD\YOLOv8n-LAWDS-p2\train\exp8\weights\best.pt"  # exp  exp4 for vid
yolov8n = r"E:\experiments\runs\cloud_runs\Small_scaled_DroneBird9K\SGD\yolov8n\train\exp7\weights\best.pt"  # exp2 exp3 for vid
yolov8n_coco = r"D:\yolo\ultralytics-20240309\ultralytics-main\yolov8n.pt"  # trained on coco ds

# img_vid_dir = r"D:\pycharmProj\my-yolov5\datasets\DroneBird9K\images\test"
img_vid_dir = r"E:\uav_datasets\Drone-vs-Bird Detection Challenge\train_videos\00_09_30_to_00_10_09.mp4"
# img_dir = r"D:\yolo\ultralytics-20240309\ultralytics-main\images\pos_G3P13236.jpg"

if __name__ == '__main__':
    model = YOLO(yolov8n)  # select your model.pt path
    model.predict(source=img_vid_dir,
                  imgsz=640,
                  project='runs/detect',
                  name='exp',
                  save=True,
                  save_txt=True,
                  # conf=0.2,
                  # visualize=True # visualize model features maps
                  )
